import request from '@/utils/request.js'

// 购物车列表
export function apiGetCartList(data){
	return request({
		url:'/cart/list',
		method:'post',
		data:data
	})
}

// 购物车详情
export function apiGetCartDetail(params){
	return request({
		url:"/cart",
		method:'get',
		params:params
	})
}
// 更新购物车
export function apiEditCart(data){
	return request({
		url:'/cart',
		method:'put',
		data:data
	})
}
// 删除购物车
export function apiDelCart(id){
	return request({
		url:'/cart/delete/'+id,
		method:'delete',
	})
}
// 新增购物车
export function apiAddCart(data){
	return request({
		url:'/cart',
		method:'post',
		data:data
	})
}
// 批量删除购物车
export function apiDelCarts(ids){
	return request({
		url:'/cart/delete/'+ids,
		method:'delete'
	})
}